package com.example.demo.vo;

import com.diboot.core.binding.annotation.*;
import com.example.demo.entity.ProductionRefundMaterial;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;
import com.example.demo.entity.Unit;
import com.example.demo.entity.ProductionOrderMaterial;
import com.example.demo.entity.Storeroom;
import com.example.demo.entity.Shelves;

/**
 * 退生产物料 DetailVO定义
 * @author MyName
 * @version 1.0
 * @date 2024-03-04
 * Copyright © MyCompany
 */
@Getter
@Setter
@Accessors(chain = true)
public class ProductionRefundMaterialDetailVO extends ProductionRefundMaterial {

    private static final long serialVersionUID = 69405058137114819L;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联对象 单位：Unit
     */
    @BindEntity(entity = Unit.class, condition = "this.unit_id=id")
    private Unit unit;

    /**
     * 关联对象 生成物料：ProductionOrderMaterial
     */
    @BindEntity(entity = ProductionOrderMaterial.class, condition = "this.procurement_order_item_id=id")
    private ProductionOrderMaterial productionOrderMaterial;

    /**
     * 关联字段 库房.名称：Storeroom.name
     */
    @BindField(entity = Storeroom.class, field = "name", condition = "this.storeroom_id=id")
    private String storeroomName;

    /**
     * 关联字段 货架.名称：Shelves.name
     */
    @BindField(entity = Shelves.class, field = "name", condition = "this.shelves_id=id")
    private String shelvesName;
}
